import request from '@/utils/request';
import { other } from './prefix';

const menuManage = {
  // 查询banner列表
  getBanner(params) {
    return request.get(other + '/banner', { params });
  },
  // 创建banner
  setBanner(params) {
    return request.post(other + '/banner', params);
  },
  // 更新banner
  updBanner(id, params) {
    return request.post(other + '/banner/' + id, params);
  },
  // 删除banner
  delBanner(id) {
    return request.delete(other + '/banner/' + id);
  },
  // 上传banner图片
  setBannerImage(id, params) {
    return request.post(other + '/banner/' + id + '?op=upload_file&name=url', params);
  },
};

export default menuManage;
